<?php
declare (strict_types = 1);

namespace app\common\validate;

use think\Validate;
class RecruitCustomerBody extends Validate
{
    protected $rule = ['customer_id' => 'require|number','username' => 'require','birthday' => 'require','sex' => 'require',
    ];

    protected $message = ['customer_id.require' => '家长id为必填项','customer_id.number' => '家长id需为数字','username.require' => '姓名为必填项','birthday.require' => '生日为必填项','sex.require' => '性别为必填项',
    ];

    /**
     * 添加
     */
    public function sceneAdd()
    {
        return $this->only(['customer_id','username','birthday','sex',]);
    }

    /**
     * 编辑
     */
    public function sceneEdit()
    {
        return $this->only(['customer_id','username','birthday','sex',]);
    }
}
